<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>

<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_student_read.css" />
<link rel="stylesheet" href="${staticServer}/css/reserve.css"/>
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/core/page_core.js"></script>
<script src="${staticServer}/js/web/reserve.js?1.3"></script>
<script src="${staticServer}/js/web/consultant_client_state.js?1.4"></script>
<script src="${staticServer}/inc/js/model_resp.js"></script>
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script src="${staticServer}/inc/js/htmlfilter.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/tips.js?1.4"></script>
<style type="text/css">
#statelist label {
	display: block;
	float: left;
	width: 120px;
}
table tr[class=fields] {
    background: #EFE5EB;
}
table tr[class=fields] th {
    height: 40px;
    line-height: 26px;
    padding-left: 10px;
    background: #EFE5EB;
}
table tr.even_row {
    background: #fcfcfc;
}
table th, table td {
    padding-left: 5px;
    padding-right: 5px;
    border: 1px solid #D0D0D0;
}
table tr>th {
    color: #999;
    font-size: 15px;
    font-weight: bold;
    text-align: right;
}
.caption {
    color: #bbb;
    font-weight: normal;
    font-size: 12px;
    font-style: italic;
}
#statelist label {
    display: block;
    float: left;
    width: 120px;
}
table tr.odd_row {
    background: #f6f6f6;
}
.caption {
    color: #bbb;
    font-weight: normal;
    font-size: 12px;
    font-style: italic;
}
.fields{ 
	position: relative; 
	top:expression(this.offsetParent.scrollTop-2); 
}

</style>
<script>
var selectMsg = function(){
	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = $("#isBySigned").is(':checked')
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var intention = $("#tip").val();
	var stat = $("#stat").val();
	var state_s = $("#state_s").val();
	var sname = $("#sname").val();
	window.location.href=encodeURI("${contextPath}/index/consultant_client_list44.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

var getFollow = function(keyname,id){
	$("#traId").val(id);
	$.post("${contextPath}/index/get_client_follow.json", {
		"keyname":keyname
	}, function(ms) {
		var list = ms.list;
		var objHtml = "";
		$("#trackList"+id).val("");
		if(list!=null){
			var j=list.length+1;
			for(var i=0;i<list.length;i++){
				var state = "";
				if(list[i].state=="" || list[i].state==null){
					state = '<a class="stateitem caption">无变化</a>';
				}else{
					state = '<a class="stateitem">'+list[i].state+'</a>';
				}
				if(list[i].state2=="" || list[i].state2==null){
					state2 = '';
				}else{
					state2 = '<a class="stateitem">'+list[i].state2+'</a>';
				}
				if(list[i].state3=="" || list[i].state3==null){
					state3 = '';
				}else{
					state3 = '<a class="stateitem">'+list[i].state3+'</a>';
				}
				if(list[i].startTime != null){
					remind_date = list[i].startTime;
				}else{
					remind_date = "";
				}				
				objHtml += '<ul>'+
	            			'<li>'+
	            				'<p class="trackingtitle" style="display: block;">第 '+(--j)+' 次跟踪记录<em class="caption">（负责人：'+list[i].nickname+'　日期：'+list[i].createTime+'）</em><a class="btnHidden" onclick="btnShow(this)">点击展开</a></p>'+
	            				'<p class="trackingstate" style="display: none;"><b>客户状态</b><span>'+state+state2+state3+'</span></p>'+
	            				'<p style="display: none;"><b>备注情况</b></p>'+
	            				'<p style="display:none;" id="re" ><b>提醒时间</b><input readonly="readonly" style="margin-left:5px;" value="'+remind_date+'" class="DatePicker_Icon" type="text" name="remind" id="remind" size="15" value="" rel="DATE::Y-m-d" /></p>'+
	            				'<div class="content" style="display: none;">'+list[i].remark+'</div>'+
	            			'</li>'+
	            		'</ul>'
			}
			$("#trackList"+id).html('<a class="stress unit" onclick="remove_tracking()"> 点击隐藏跟踪记录 </a>'+objHtml);
			$("#__TRACKING_LIST"+id).show();
			
		}
		
	});
}
function btnShow(obj){
	 var b = $(obj).siblings('.caption').parent().parent().find('p:not(:first)').visible();
	 var s = $(obj).siblings('.caption').parent().parent().parent().children();
	 var h = $(obj).siblings('.caption').parent();
	 var remind = $(obj).siblings('.caption').parent().parent().find('#remind').val();
	 var sh = null;
	 if(remind!=""){
		 sh = $(obj).siblings('.caption').parent().parent().parent().children().children();
		}else{
		 sh = $(obj).siblings('.caption').parent().parent().parent().children().children().not("#re");
		}	
	 if(b == false){
			 sh.show();
			 s.show();
	 }else{
		 	sh.hide();
		 	h.show();
	 }
	}

var remove_tracking = function(){
	var id = $("#traId").val();
	$("#__TRACKING_LIST"+id).hide();
}

var addFloat = function(keyname){
	$("#keyname").val(keyname);
	$("#__DIV_CLIENT_SELECTOR_MASK").show();
	$("#__DIV_CLIENT_SELECTOR").show();
}

var quxiao = function(){
	$("#__DIV_CLIENT_SELECTOR_MASK").hide();
	$("#__DIV_CLIENT_SELECTOR").hide();
}


function submit_form()
{
	var data = {};
	// 客户资料
	// 跟踪数据
	data.keyname = $("#keyname").val();
	var id = $("#traId").val();
	data.remark = $( "#remark" ).html();
	data.protime = $("#proTime").val();
	data.target = $("#target").val();
	
	var states = [];

  	$( "#statelist input:checked" ).each( function(){
		var val = $( this ).attr( "value" );
		states.push( val );
	} );
	
	data.states = states.join( "," );
	
	if((data.states).indexOf("138g5wfwm1mx")>=0 && data.protime ==""){
		alert("请设置定时提醒的时间。");
		return false;
	}
	
	if((data.states).indexOf("o3dpi9gzuol4")>=0 && data.target ==""){
		alert("请设置转交老师。");
		return false;
	}
	
	if( ( data.remark == "" || data.remark == "无" ) && data.invalid == 0 )
	{
		alert( "跟踪备注信息必须填写。" );
		return;
	}

	submitter.post( "${contextPath}/index/add_client_follow.json", data, function( d )
	{
		location.reload();
		$("#__DIV_CLIENT_SELECTOR_MASK").hide();
		$("#__DIV_CLIENT_SELECTOR").hide();
	}, "json" );
}
	function reset(){
		document.getElementById("condition").value="";
		$("#btnInvalid").removeAttr("checked");
		$("#isBySigned").removeAttr("checked");
		document.getElementById("startTime").value="";
		document.getElementById("endTime").value="";
		
	}

var timeout = function(){
	var b = $(".odd1_row").visible();
	var a = $(".odd2_row").visible();
	if(b == false && a == false){
		$(".Zebra_DatePicker").css('z-index','9900');
		$(".odd1_row").show();
	}else if( b == true && a == false){
		$(".odd1_row").hide();
	}else{
		infopad.err( "“计划跟踪”和“已转交”不能同时设定。");
		$(".odd1_row").hide();
	}
}	
var target = function(){
	var a = $(".odd2_row").visible();
	var b = $(".odd1_row").visible();
	if(a == false && b == false ){
		$(".odd2_row").show();
	}else if( b == true && a == false){
		$(".odd2_row").hide();
	}else{
		infopad.err( "“计划跟踪”和“已转交”不能同时设定。");
		$(".odd2_row").hide();	
	}
}
//下拉框选择保存
function intsave(keyname,intention,inten){
	if(confirm('确定保存吗？')){
	$.post("${contextPath}/index/addConsultant_client_first.json", {"keyname":keyname,"intention":intention}, function( d )
	{	
		location.reload();
	}, "json" );
	}else{
		$("#intention").val(inten);
	}
}

//下拉框选择查询
function query_tip(intention){
	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = $("#isBySigned").is(':checked')
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var stat = $("#stat").val();
	var state_s = $("#state_s").val();
	var sname = $("#sname").val();
	location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

function query_stat(state_s){
	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = $("#isBySigned").is(':checked')
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var stat = $("#inten").val();
	var intention = $("#tip").val();
	var sname = $("#sname").val();
	location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

//输入框回车事件
function EnterPress(e){
var e = e || window.event; 
if(e.keyCode == 13){ 
	var total = $("#total").val();
	var page = $("#pages").val();
	var nickname = $("#nick").val();
	var invalid = $("#inva").val();
	var startTime = $("#start").val();
	var endTime = $("#end").val();
	var intention = $("#tip").val();
	var stat = $("#stat").val();
	var state_s = $("#state_s").val();
	var sname = $("#sname").val();
	if(page<=total){
		location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?currPage="+page+"&nickname="+nickname+"&invalid="+invalid+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
	}else{
		alert("输入的页数要小于总页数。");
	}
	} 
} 

function mdate(){
 	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = "mdate";
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var intention = $("#tip").val();
	var stat = $("#stat").val();
	var state_s = $("#state_s").val();
	var sname = $("#sname").val();
	location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

function cdate(){
	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = "cdate";
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var intention = $("#tip").val();
	var stat = $("#stat").val();
	var state_s = $("#state_s").val();
	var sname = $("#sname").val();
	location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

function state(stat){
	var nickname = $("#condition").val();
	var btnInvalid = $("#btnInvalid").is(':checked')
	var isBySigned = "cdate";
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	var intention = $("#tip").val();
	var state_s = $("#inten").val();
	var sname = $("#sname").val();
	
	location.href=encodeURI("${contextPath}/index/consultant_client_list4.htm?nickname="+nickname+"&btnInvalid="+btnInvalid+"&isBySigned="+isBySigned+"&startTime="+startTime+"&endTime="+endTime+"&intention="+intention+"&state="+stat+"&state_s="+state_s+"&sname="+sname);
}

function show(id){
	document.getElementById(id).style.display="block";
}
function hide(id){
	document.getElementById(id).style.display="none";
}

</script>
</head>

<body>
<input type="hidden" id="inten" value="">
<input type="hidden" id="keyname" value="">
<input type="hidden" id="traId" value="">

<input type="hidden" id="isBySigned" value="${isBySigned}">

<div id="__DIV_CLIENT_SELECTOR" style="position: absolute; z-index: 9900; top:200px;left:304px;display: none;width:900px; max-height:477px; background-color:#FFF;">
    	<table><tr class="fields">
				<th colspan="2">添加客户跟踪记录</th>
			</tr>
			<tr class="even_row">
				<th width="25%">此次客户状态
					<p class="caption">状态可多选，不选择代表“无变化”</p>
				</th>
				<td width="75%" id="statelist">
					<label for="state_1" title="明确不参加"><input id="state_1" type="checkbox" value="qenzgu6wde3c">不参加</label>
					<label for="state_2" title="有较高意向和兴趣"><input id="state_2" type="checkbox" value="nhb8wyq1nda5">高意向</label>
					<label for="state_3" title="已经发送相关协议"><input id="state_3" type="checkbox" value="qyebkhp2x67y">已发协议</label>
					<label for="state_4" title="计划另行跟踪"><input id="state_4" type="checkbox" onclick="timeout()" value="138g5wfwm1mx">计划跟踪</label>
					<label for="state_5" title="已转交其它老师"><input id="state_5" type="checkbox" onclick="target()" value="o3dpi9gzuol4">已转交</label>
					<label for="state_6" title="已成功预约测评"><input id="state_6" type="checkbox" value="mldqhlrg1sad">已预约</label>
					<label for="state_7" title="已完成测评"><input id="state_7" type="checkbox" value="caoodurhkcl6">已测评</label>
					<label for="state_8" title="已缴费开始训练"><input id="state_8" type="checkbox" value="znouq0wygvbb">已缴费</label>
					<label for="state_9" title="已退费中止训练"><input id="state_9" type="checkbox" value="krm8s91foapx">已退费</label>
					<label for="state_11" title="预约成功的客户未出现"><input id="state_11" type="checkbox" value="n9fjwyx5w74g">未出现</label>
					<label for="state_12" title=""><input id="state_12" type="checkbox" value="n4f79h2giie6">意向一般</label>
					<label for="state_13" title=""><input id="state_13" type="checkbox" value="rym23z0aopkk">一直关机</label>
					<label for="state_14" title="无法接通"><input id="state_14" type="checkbox" value="pflp6f14pers">无法接通</label>
					<label for="state_15" title=""><input id="state_15" type="checkbox" value="ikslzv14e1dt">接通挂断</label>
					<label for="state_16" title=""><input id="state_16" type="checkbox" value="uj69ezpbh5a6">无人接听</label>
				</td>
			</tr>
			<tr class="odd1_row" style="display:none;">
				<th width="25%" style="padding: 15px 10px 15px 10px;">定时提醒</th> 
				<td width="75%"><div id="jhtime" contenteditable="true">
				<input type="text" name="pro_time" id="proTime" size="15" value="" rel="DATE::Y-m-d" />
				<p class="caption">需要计划在某日期跟踪时，设置“定时提醒”，当天会有消息提醒！</p></td>
			</tr>
			<tr class="odd2_row" style="display:none;" >
				<th width="25%" style="padding: 15px 10px 15px 10px;">转交目标
				<p class="caption">转交目标必须同样是咨询师</p>
				</th>
				<td width="75%"><div id="lodusername" contenteditable="true">
				<select id="target">
                	<option value="">-- 请选择目标 --</option>
                	<#if uList??>
						<#list uList as list>
                			<option value="${list.username}">${list.nickname}（${list.regions}-${list.departments}-${list.job}）</option>
                		</#list>
                	</#if>
                	<#if uLists??>
						<#list uLists as lists>
                			<option value="${lists.username}">${lists.nickname}（${lists.regions}-${lists.departments}-${lists.job}）</option>
                		</#list>
                	</#if>
                	</select>
				<p class="caption">成功转交后，你将无法在对该客户进行维护和跟踪，且从你个人客户资源中去除。</p></td>
			</tr>
			<tr class="odd_row">
				<th width="25%" style="padding: 15px 10px 15px 10px;">跟踪情况
					<p class="caption">客户咨询内容摘要，如“咨询问题”等</p>
				</th>
				<td width="75%"><div id="remark" contenteditable="true">无</div></td>
			</tr>
            <tr>
            	<th colspan="2" style="height:40px;">
                    <div style="width:120px; margin-left:auto; margin-right:auto;">
                    <a id="btn_cancel"  onclick="quxiao()">[ 取消 ]</a>
                    <a id="btn_enter" onclick="submit_form()">[ 确定 ]</a>
                    </div>
                </th>
            </tr>
		</table>
</div>

	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>咨询师模块</li>
			<li>&gt;</li>
			<li class="current">市场部客户资源列表</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
				<td><div style="overflow: hidden;">
						<label><b>查询条件：</b></label>
						<input type="text" id="condition" size="50" value="${nickname}" placeholder="姓名/学员名/渠道/电话/邮箱/QQ/地区" /> 
						<label for="btnInvalid"><input type="checkbox" <#if invalid?? && invalid=="true">checked</#if> id="btnInvalid" style="margin-top: 6px;" />过滤无效客户</label> 
					</div>
					<div style="overflow: hidden;">
						<label for="start_date">起始日期：</label>
						<input type="text" name="start_date" id="startTime" size="15" value="${startTime}" rel="DATE::Y-m-d" /> 
						<label for="end_date">终止日期：</label> 
						<input type="text" name="end_date" id="endTime" size="15" value="${endTime}" rel="DATE::Y-m-d" />
						<input type="button" value=" 查 询 " onclick="selectMsg()" />
						<input type="button" name="button2" onclick="reset()" value=" 重 置 ">
					</div></td>
			</tr>
		</table>
		<table>
			<tr class="fields" style="height: 60px;">
				<th>
				<select style="margin-left:2px;" id="tip" onchange="query_tip(this.value)">
						<option value="">意向度</option>
			            <option value="A" <#if intention == "A">selected</#if> >A</option>
			            <option value="B" <#if intention == "B">selected</#if> >B</option>
			            <option value="C" <#if intention == "C">selected</#if> >C</option>
			            <option value="D" <#if intention == "D">selected</#if> >D</option>
		            </select></th>
					
				<th>客户<br/>姓名</th>
				<th>登记人</th>
				<th>所在地</th>
				<th>渠道</th>
				<th>联系<br/>方式</th>
				<th>学员</th>
				<th>学生特征</th>
				<th><select style="margin-left:2px;" id="state" onchange="query_stat(this.value)">
						<option value="">客户状态</option>
			            <option value="已预约" <#if state_s == "已预约">selected</#if> >已预约</option>
			            <option value="已测评" <#if state_s == "已测评">selected</#if> >已测评</option>
			            <option value="已缴费" <#if state_s == "已缴费">selected</#if> >已缴费</option>
			            <option value="未出现" <#if state_s == "未出现">selected</#if> >未出现</option>
			            <option value="无" <#if state_s == "无">selected</#if> >无</option>
			            
		            </select>
		          </th>
		            
				<th>最新跟踪情况</th>
				<th><input type="button" style="height:25px;" value="更新日期" onclick="mdate()" /></th>
				<th><input type="button" style="height:25px;" value="登记日期" onclick="cdate()" /></th>
				<th>操作</th>
				<#if sname?? && sname=="1">
					<th>缴费金额</th>
				</#if>
			</tr>
			<#if list??>
				<#list list as list>
					<tr class="even_row">
					 <td align="center"><select id="intention" <#if sname?? && sname=="1"><#else>onchange="intsave('${list.keyname}',this.value,'${list.intention}');"</#if> >
						<#if list.intention =="A" ||list.intention=="高意向">
		                	<option selected value="A">A</option>
		                	<option value="B">B</option>
		                	<option value="C">C</option>
		                	<option value="" >暂无</option>
		                <#elseif list.intention=="B" ||list.intention=="意向一般">
		                	<option value="A">A</option>
		                	<option selected value="B">B</option>
		                	<option value="C">C</option>
		                	<option value="" >暂无</option>	
		                <#elseif list.intention=="C" ||list.intention=="可跟踪">
		                	<option value="A">A</option>
		                	<option value="B">B</option>
		                	<option selected value="C">C</option>
		                	<option value="" >暂无</option>
		                <#else>
		                	<option value="A">A</option>
		                	<option value="B">B</option>
		                	<option value="C">C</option>
		                	<option value="" selected>暂无</option>
	                	</#if>
               		 </select>
					 
					
					</td>
						<td align="center" class="stress">
							<a <#if sname!="1">href="${contextPath}/index/consultant_client.htm?keyname=${list.keyname}"</#if> name="${list.keyname}" <#if list.invalid=="1">style="color:#999"</#if> title="" id="icoont173oz7">
								${list.nickname}</a></br><em class="valid" <#if list.invalid=="1">style="color:#999"</#if> ><#if list.invalid=="0">(有效)<#else>(无效)</#if></em>
							
						</td>
						<td align="center" style="width:50px;">${list.rawuser}</td>
						<td align="center">${list.province}<#if list.city!=''>-${list.city}</#if></td>
						<td align="center">${list.sourcens}</td>
						<td align="center">
						<#if list.phlist??>
							<#list list.phlist as phlist>
							<a title="<#if phlist.phone!="">电话：${phlist.phone}</#if> <#if list.qq!="">QQ：${list.qq}</#if> <#if list.weixin!="">微信：${list.weixin}</#if> <#if list.email!="">邮箱：${list.email}</#if> " id="${list.id}">
							<#assign phone = "${phlist.phone}">
							<#if phlist.name=="爸爸" || phlist.name=="妈妈">
								<em class="caption">电话：</em><br/>${phlist.phone}<br/>
								<em class="caption">关系：</em>${phlist.name}<br/>
							<#elseif phlist.guanxi!="">
								<em class="caption">电话：</em><br/>${phlist.phone}<br/>
								<em class="caption">关系：</em>${phlist.guanxi}<br/>
							<#else>
								<em class="caption">电话：</em><br/>${phlist.phone}<br/>
								<em class="caption">关系：</em>${phlist.name}<br/>
							</#if>
							</a>
     						</#list>
     						<#else>
						<a title="<#if list.phone!="" && list.phone?contains('[]')==false>电话：${list.phone}</#if> <#if list.qq!="">QQ：${list.qq}</#if> <#if list.weixin!="">微信：${list.weixin}</#if> <#if list.email!="">邮箱：${list.email}</#if> " id="${list.id}">
     						<#if list.phone!="" && list.phone?contains('[]')==false>
     						<em class="caption">电话：</em><br/>${list.phone}
     						<#elseif list.qq!="">
     						<em class="caption">QQ:</em>${list.qq}
     						<#elseif list.weixin!="">
     						<em class="caption">微信:</em>${list.weixin}
     						<#elseif list.email!="">
     						<em class="caption">email:</em>${list.email}
     						</#if>
     						</a>
     					  </#if>
     					</td>
     					<td align="center">
						<#if list.student??>
							<#list list.student?split(",") as student>
         						${student}
     						</#list>
     					</#if>
						</td>
						<td class="breakall" width="58">
                        	<div onmouseover="show('ic${list.id}')" onmouseout="hide('ic${list.id}')">
                                <div contenteditable="false" style="position:relative;" id="xueyuan">
                                   	<#if list.feature!=null && list.feature?replace("<.*?>","","r")?length gt 10>${list.feature?replace("<.*?>","","r")?substring(0,10)}...<#elseif list.feature!=null>${list.feature?replace("<.*?>","","r")}</#if>
                                    <div id="ic${list.id}" style="display:none;position: absolute; top:-250px; height:280px; border: 1px solid rgb(153, 153, 153); font-size: 14px; color: rgb(51, 51, 51); background: rgb(255, 255, 238); z-index: 99999; padding: 5px 10px; margin: 0px; overflow-y:auto; line-height: 22px; word-break: break-all; border-radius: 4px; box-shadow: rgb(204, 204, 204) 1px 1px 3px;width:450px; opacity:0.95;" >
                                    	<#if list.feature!=null>${list.feature}</#if>
                                    </div>
                                <div>
                            </div>
                        </td>
						
						<td class="breakall" width="58"><div contenteditable="false" style="text-align:center;" >
						<input type="hidden" id="stat" value="<#if state??>${state}</#if>">
						<#assign states = "${list.states}">
						<#if states?contains(',')?string == true>
							<#list states?split(',') as sta>
								<p style="margin:2px 0 2px;">
								<a class="stateitem" onclick="state('${sta}')" rel="">${sta}</a>
								</p>
							</#list>
							<#elseif list.states??>
							<a class="stateitem" onclick="state('${list.states}')" rel="">${list.states}</a>
							<#else>
													<a class="stateitem" onclick="state('无')" rel="">无	</a>
							
						</#if>
						</div></td>
											
						<td class="breakall"><div contenteditable="false" title="${list.fallow}"><#if list.fallow?length gt 15>${list.fallow?substring(0,15)}...<#else>${list.fallow}</#if></div><em class="caption" title="${list.newTime}">${list.newTime}</em></td>
						<td align="center"><#if list.modeTime??>${list.modeTime}</#if></td>
						<td align="center"><#if list.dateTime??>${list.dateTime}</#if></td>
						<td align="center">
							<a onclick="getFollow('${list.keyname}','${list.id}')" class="btnSearchTracking">历史跟踪(${list.trackings})</a>
							<#if sname?? && sname=="1">
							<#else>
							- 
							<a onclick="addFloat('${list.keyname}')" id="okiyihbekauf">添加跟踪</a>
							</#if>
						</td>
						<#if sname?? && sname=="1">
						<td align="center">
						<#if list.moneys??>${list.moneys}</#if>
						</td>
						</#if>
					</tr>
				
	            <tr id="__TRACKING_LIST${list.id}" style="display:none">
	            	<td colspan="10" class="trackinglst" id="trackList${list.id}">
	            	</td>
	            </tr>
				</#list>
			</#if>
		</table>
	</div>
	<div id="pager">
	<input type="hidden" id="sname" value="${sname}">
	<input type="hidden" id="inva" value="${invalid}" />
	<input type="hidden" id="nick" value="${nickname}">
	<input type="hidden" id="start" value="${startTime}" />
	<input type="hidden" id="end" value="${endTime}" />
	<ul id="pagination" style="padding-left: 14px">
		<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				
				<#if currpage==1 >
					<li class="previous-off">首页</li>
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/index/consultant_client_list4.htm?currPage=1&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">首页</a></li>
					<li class="previous"><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${currpage-1}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">上一页</a></li>
					</#if>
					<input type="hidden" id="total" value="${page.pagetotal}" />	
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${index_up}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${index_up}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${pagetotal}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=1&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${index_up}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${pagetotal}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=1&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${index_up}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		 	<li class="previous-off">尾页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${currpage+1}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">下一页</a></li>
			<li class="previous"><a href="${contextPath}/index/consultant_client_list4.htm?currPage=${page.pagetotal}&nickname=${nickname}&invalid=${invalid}&startTime=${startTime}&endTime=${endTime}&intention=${intention}&state=${state1}&state_s=${state_s}&sname=${sname}">尾页</a></li>
		</#if>
		<li class="previous"><input type="text" id="pages" onkeypress="EnterPress(event)" size="10" placeholder="跳转页数" style="line-height: 30px; padding: 0 11px 0 11px;"></li>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
	</ul>
	</div>
	<div class="emptyline"></div>
	
<div id="__DIV_CLIENT_SELECTOR_MASK" style="display: none; position: absolute; z-index: 8999; opacity: 0.2; width: 2088px; height: 1925px; left: 0px; top: 0px; background-color: rgb(0, 0, 0);"></div>
<div id="__DIV_CLIENT_SELECTOR" style="background-color: wheat;position: absolute; z-index: 9000; display: none; left: 7em; top: 230px;">
	<dt><br/><span id="title">添加客户跟踪记录</span></dt>
	<div id="form" style="width:900px;">
		<td width="75%" id="statelist">
				<label for="state_1" title="明确不参加"><input id="box" type="checkbox" value="qenzgu6wde3c">不参加</label>
				<label for="state_2" title="有较高意向和兴趣"><input id="box" type="checkbox" value="nhb8wyq1nda5">高意向</label>
				<label for="state_3" title="已经发送相关协议"><input id="box" type="checkbox" value="qyebkhp2x67y">已发协议</label>
				<label for="state_4" title="计划另行跟踪"><input id="box" type="checkbox" value="138g5wfwm1mx">计划跟踪</label>
				<label for="state_5" title="已转交其它老师"><input id="box" type="checkbox" value="o3dpi9gzuol4">已转交</label>
				<label for="state_6" title="已成功预约测评"><input id="box" type="checkbox" value="mldqhlrg1sad">已预约</label>
				<label for="state_7" title="已完成测评"><input id="box" type="checkbox" value="caoodurhkcl6">已测评</label>
				<label for="state_8" title="已缴费开始训练"><input id="box" type="checkbox" value="znouq0wygvbb">已缴费</label>
				<label for="state_9" title="已退费中止训练"><input id="box" type="checkbox" value="krm8s91foapx">已退费</label>
				<label for="state_11" title="预约成功的客户未出现"><input id="box" type="checkbox" value="n9fjwyx5w74g">未出现</label>
				<label for="state_12" title=""><input id="box" type="checkbox" value="n4f79h2giie6">意向一般</label>
				<label for="state_13" title=""><input id="box" type="checkbox" value="rym23z0aopkk">一直关机</label>
				<label for="state_14" title="无法接通"><input id="box" type="checkbox" value="pflp6f14pers">无法接通</label>
				<label for="state_15" title=""><input id="box" type="checkbox" value="ikslzv14e1dt">接通挂断</label>
				<label for="state_16" title=""><input id="box" type="checkbox" value="uj69ezpbh5a6">无人接听</label>
				<label for="state_17" title=""><input id="box" type="checkbox" value="x79wzgwvtlw4">空号</label>
				<label for="state_18" title=""><input id="box" type="checkbox" value="jvk1n2y542sw">无意向</label>
				<label for="state_19" title=""><input id="box" type="checkbox" value="27gflkc3y4j8">正在通话中</label>
				<label for="state_20" title=""><input id="box" type="checkbox" value="37nsij5vk6s9">有意向</label>
				<label for="state_21" title="不是当事人接电话，或者直接挂断"><input id="box" type="checkbox" value="w8j09zdfxhp1">未通</label>
				<label for="state_22" title="了解过，有印象，但不需要"><input id="box" type="checkbox" value="jezobexay0iq">了解&amp;不需要</label>
				<label for="state_23" title=""><input id="box" type="checkbox" value="t0aklt2bks96">孩子不在重庆</label>
				<label for="state_24" title=""><input id="box" type="checkbox" value="5cw0p5pk8brw">暂时没空</label>
				<label for="state_25" title=""><input id="box" type="checkbox" value="n0280meoxdhy">停机</label>
		</td>
		
	</div>
	<div id="body">
	<ul><li class="empty"><br><br><p class="bold">跟踪内容：</p><input id="remark" size="50"><br/></li><br/></ul>
	<a id="btn_cancel" onclick="quxiao()">[ 取消 ]</a> <a id="btn_enter" onclick="submit_form()">[ 确定 ]</a>
	</div><br>
</div>

<script>
$(document).ready(function(){
var bh =$(window).height()/2;
var bw =$("body").width()/2;
var h = $("#__DIV_CLIENT_SELECTOR").height()/2;
var w =$("#__DIV_CLIENT_SELECTOR").width()/2;
var mh = bh-h-80;
var mw = bw-w;
  $("#__DIV_CLIENT_SELECTOR").css({"top":mh,"left":mw,"position":"fixed"});
  $("#__DIV_CLIENT_SELECTOR_MASK").css("position","fixed");
});

</script>
	
</body>
</html>